﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.vehicle.maintenance.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>维护记录管理</title>
		
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css">
			<script src="/module/date_selector/popcalendar.js"></script>
			<script src="/aspnet_client/core/function.js"></script>
			<script Language="JavaScript">
function CheckForm()
{
   	if(!checkIsDate(document.getElementById("txtBeginDate").value))
	{
		alert("开始日期不正确！");
		document.getElementById("txtBeginDate").focus();
		return (false);
	}
	
	if(!checkIsDate(document.getElementById("txtEndDate").value))
	{
		alert("结束日期不正确！");
		document.getElementById("txtEndDate").focus();
		return (false);
	}	
	
   if (!checkIsDouble(document.getElementById("txtFeeMin").value))
   {
		alert("维护费用最小值应为数字！");
		document.getElementById("txtFeeMin").focus();
		return (false);
   }
     if (!checkIsDouble(document.getElementById("txtFeeMax").value))
   {
		alert("维护费用最大值应为数字！");
		document.getElementById("txtFeeMax").focus();
		return (false);
   } 

  return true;
}

			</script>
			<script>
function delete_vehicle(m_id)
{
 msg='确认要删除该维护信息么？';
 if(window.confirm(msg))
 {
  URL="delete.aspx?m_id=" + m_id;
  window.location=URL;
 }
}
			</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/menu/vehicle.gif" HEIGHT="20"  align="absMiddle"><span class="big3"> 维护记录管理</span>
					</td>
				</tr>
			</table>
			<br>
			<asp:Panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="1" cellPadding="2" width="500" align="center" bgColor="#000000"
					border="0">
					<TR>
						<TD class="TableHeader" noWrap colSpan="2"><IMG src="/images/green_arrow.gif"> 请指定查询条件：
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap width="80">车 牌 号：</TD>
						<TD class="TableData" width="470">
							<asp:DropDownList id="ddlVehicleId" runat="server" CssClass="BigSelect"></asp:DropDownList></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>维护日期：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtBeginDate" runat="server" CssClass="BigInput" Columns="12" MaxLength="10"></asp:TextBox>&nbsp;<IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtBeginDate,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0">&nbsp;至
							<asp:TextBox id="txtEndDate" runat="server" CssClass="BigInput" Columns="12" MaxLength="10"></asp:TextBox>&nbsp;<IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtEndDate,'yyyy-mm-dd','');" src="/module/date_selector/calendar.gif"
								align="absMiddle" border="0"></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>维护类型：</TD>
						<TD class="TableData">
							<asp:DropDownList id="ddlType" runat="server" CssClass="BigSelect">
								<asp:ListItem Value="" Selected="True"></asp:ListItem>
								<asp:ListItem Value="维修">维修</asp:ListItem>
								<asp:ListItem Value="加油">加油</asp:ListItem>
								<asp:ListItem Value="洗车">洗车</asp:ListItem>
								<asp:ListItem Value="年检">年检</asp:ListItem>
								<asp:ListItem Value="其它">其它</asp:ListItem>
							</asp:DropDownList></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>维护原因：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtReason" runat="server" CssClass="BigInput" Columns="40" MaxLength="200"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>经 办 人：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtPerson" runat="server" CssClass="BigInput" Columns="12" MaxLength="20"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>维护费用：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtFeeMin" runat="server" CssClass="BigInput" Columns="12" MaxLength="12"></asp:TextBox>&nbsp;至
							<asp:TextBox id="txtFeeMax" runat="server" CssClass="BigInput" Columns="12" MaxLength="12"></asp:TextBox></TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>备 注：</TD>
						<TD class="TableData">
							<asp:TextBox id="txtRemark" runat="server" CssClass="BigInput" Columns="40" MaxLength="200"></asp:TextBox></TD>
					</TR>
					<TR class="TableControl" align="center">
						<TD noWrap colSpan="2"><INPUT class="BigButton" onclick="return  CheckForm();" type="submit" value="查询">&nbsp;&nbsp;
							<INPUT class="BigButton" type="reset" value="重填">
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlSearch" runat="server" Visible="False">
				<TABLE class="small" cellSpacing="1" cellPadding="3" width="95%" bgColor="#000000" border="0">
					<TR class="TableHeader">
						<TD noWrap align="center">车牌号</TD>
						<TD noWrap align="center">维护类型</TD>
						<TD noWrap align="center">维护原因</TD>
						<TD noWrap align="center">维护日期</TD>
						<TD noWrap align="center">经办人</TD>
						<TD noWrap align="center">维护费用</TD>
						<TD noWrap align="center">备注</TD>
						<TD noWrap align="center">操作</TD>
					</TR>
					<asp:Repeater id="rptSearch" runat="server" EnableViewState="False">
						<ItemTemplate>
							<tr class="TableLine1">
								<td nowrap align="center"><%#Eval("Number")%></td>
								<td nowrap align="center"><%#Eval("Type")%></td>
								<td><%#Eval("Reason")%></td>
								<td nowrap align="center"><%#Eval("RequestDate") != DBNull.Value ? Convert.ToDateTime(Eval("RequestDate")).ToString("yyyy-MM-dd") : ""%></td>
								<td nowrap align="center"><%#Eval("Person")%></td>
								<td nowrap align="right"><%#Eval("Fee")%></td>
								<td><%#Eval("Remark")%></td>
								<td nowrap align="center">
								<a href="edit.aspx?m_id=<%#Eval("MaintenanceId")%>">修改</a>&nbsp; <a href="javascript:delete_vehicle('<%#Eval("MaintenanceId")%>');">删除</a>
								</td>
							</tr>
						</ItemTemplate>
						<AlternatingItemTemplate>
						<tr class="TableLine2">
								<td nowrap align="center"><%#Eval("Number")%></td>
								<td nowrap align="center"><%#Eval("Type")%></td>
								<td><%#Eval("Reason")%></td>
								<td nowrap align="center"><%#Eval("RequestDate") != DBNull.Value ? Convert.ToDateTime(Eval("RequestDate")).ToString("yyyy-MM-dd") : ""%></td>
								<td nowrap align="center"><%#Eval("Person")%></td>
								<td nowrap align="right"><%#Eval("Fee")%></td>
								<td><%#Eval("Remark")%></td>
								<td nowrap align="center">
								<a href="edit.aspx?m_id=<%#Eval("MaintenanceId")%>">修改</a>&nbsp; <a href="javascript:delete_vehicle('<%#Eval("MaintenanceId")%>');">删除</a>
								</td>
							</tr>
						</AlternatingItemTemplate>
					</asp:Repeater>
					<TR class="TableControl">
						<TD noWrap align="center"><B>合计：</B></TD>
						<TD noWrap align="center" colSpan="4"></TD>
						<TD noWrap align="right">
							<asp:Literal id="litTotalFee" runat="server"></asp:Literal>元
						</TD>
						<TD noWrap align="center" colSpan="2"></TD>
					</TR>
				</TABLE>
				<BR>
				<CENTER><INPUT class="BigButton" onclick="location='query.aspx';" type="button" value="返回"></CENTER>
			</asp:Panel>
			<asp:Literal id="litMessage" runat="server"></asp:Literal>
		</form>
	</body>
</HTML>
